package cn.zq.canal.listener;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @description:
 * @author: zhengqi
 * @time: 2022/2/18 3:38 下午
 */
@Component
@Slf4j
@RequiredArgsConstructor
public class CanalListener {
    @RabbitListener(queues = "canal.queue")
    public void handle(String message) {
        log.info("\nmessage: = {}\n", message);
    }
}
